package org.openea.eap.module.obpm.model.form.constants;

/**
 * 布尔常量
 */
public interface BooleanConstants {

    public static final int NO = 0;
    public static final int YES = 1;

    public static final String STR_YES = "Y";
    public static final String STR_NO = "N";

    public static final int DISABLED = 0;
    public static final int ENABLED = 1;

    public static final short NO_SHORT = 0;
    public static final short YES_SHORT = 1;

    public static final boolean TRUE = true;
    public static final boolean FALSE = false;

    public static final String TRUESTR = "true";
    public static final String FALSESTR = "false";

    public static final String STR_TRUE = "1";
    public static final String STR_FALSE = "0";

    public static final String YES_STR = "1";
    public static final String YES_NO = "0";

    static Integer isTrue(String strYesOrNo) {
        if ("Y".equalsIgnoreCase(strYesOrNo)) {
            return Integer.valueOf(1);
        }
        return Integer.valueOf(0);
    }
}
